﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace childcare
{
    public partial class frmadmin : Form
    {
        SqlConnection con = new SqlConnection();
        private DataTable dt = new DataTable("children");
        private SqlDataAdapter da = new SqlDataAdapter();
        public frmadmin()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void frmtrangchinh_Load(object sender, EventArgs e)
        {
            connectdatabase.Openconnect();
            string connect = @"Data Source=BLACK-PC\SQLEXPRESS;Initial Catalog=Childcare;Integrated Security=True";
            con = new SqlConnection(connect);

        }

        private void txtthem_Click(object sender, EventArgs e)
        {
            frmquanlytaikhoan _frmtaikhoan = new frmquanlytaikhoan();
            _frmtaikhoan.Show();
            this.Hide();
        }

        private void btnthoat_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc chắn muốn thoát ?", "THOÁT", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                this.Close();
                login _frmlogin = new login();
                _frmlogin.Show();
            }

        }

        private void btnthongtingv_Click(object sender, EventArgs e)
        {
            frmteacher _frmteacher = new frmteacher();
            _frmteacher.Show();
            this.Hide();
        }

        private void btnxeplop_Click(object sender, EventArgs e)
        {
            frm_xeplop _frmxeplop = new frm_xeplop();
            _frmxeplop.Show();
            this.Hide();
        }

        private void btnthang_Click(object sender, EventArgs e)
        {
            frmtien_thang _frmthang = new frmtien_thang();
            _frmthang.Show();
            this.Hide();
        }

        private void btnnam_Click(object sender, EventArgs e)
        {
            frmtien_nam _frmnam = new frmtien_nam();
            _frmnam.Show();
            this.Hide();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }
    }
}
